package io.renren.common.utils;

import java.io.UnsupportedEncodingException;
import java.util.ResourceBundle;


/**
 * 配置文件
 * @author Administrator
 *
 */
public class Config {
	private static Config config;

	public static String issuerId;
	public static String tollProvinceId;
	public static String versioninfo;
	public static String downloadpath;
	public static int unnum;
	public static int uploadtime;
	
	public Config(){
		init();
	}
	/**
	 * 实例获取方法
	 */
	public static Config  getInstance(){
		return config==null?new Config():config;
	}
	/**
	 * 初始化参数获取方法
	 * @throws UnsupportedEncodingException 
	 */
	private void init() {
		
		ResourceBundle bundle = ResourceBundle.getBundle("config");
		issuerId = bundle.getString("issuerId");
		tollProvinceId= bundle.getString("tollProvinceId");
		versioninfo =  bundle.getString("versioninfo");
		downloadpath = bundle.getString("downloadpath");
		unnum=Integer.valueOf(bundle.getString("unnum"));
		uploadtime=Integer.valueOf(bundle.getString("uploadtime"));
	}
	
}
